export const stringToTime = (str: string) => {
  return str.split(':').map((e) => parseInt(e));
};

export const timeToString = (time: [number, number?]) => {
  return `${time[0].toString().padStart(2, '0')}:${(time[1] || '')
    .toString()
    .padStart(2, '0')}`;
};
